package com.xmall.service.util;

import com.xmall.bean.table.System;
import com.xmall.bean.table.SystemExample;
import com.xmall.mapper.SystemMapper;

import java.util.List;

/**
 * @author Connor
 * @ClassName: ConfigUtils
 * @PackageName: com.xmall.service.util
 * @date 2020/12/08
 * @Version 1.0
 */
public class ConfigUtils {

    public static List<System> invoke(SystemMapper systemMapper, String keyName) {
        SystemExample systemExample = new SystemExample();
        SystemExample.Criteria criteria = systemExample.createCriteria();
        criteria.andKeyNameLike(keyName + "%");
        criteria.andDeletedEqualTo(false);
        return systemMapper.selectByExample(systemExample);
    }
}
